package events;

import java.net.URL;

import core.Blog;

/**
 * This event should be thrown when a new HTTP source has been added to a Blog
 * and every AddedSourceListener should be called with it as argument.
 * 
 * @author ole
 */
public class AddedSourceEvent extends BlogEvent {
	// Class constants.
	private static final long serialVersionUID = 1L;
	
	// Class attributes.
	private URL url;

	/*
	 * Public methods.
	 */
	
	/**
	 * Class constructor.
	 * 
	 * @param source:
	 * 		The Blog that raises this event.
	 */
	public AddedSourceEvent(Blog source, URL url) {
		super(source);
		this.url = url;
	}
	
	/**
	 * Returns the new URL added.
	 * 
	 * @return
	 * 		The new URL added to the Blog.
	 */
	public URL getUrl() {
		return url;
	}
}
